import { Component, OnInit } from '@angular/core'

import { CommonGroupService } from '@shared/services/group.service'
import { PageService } from '@shared/services/page.service'
import { ETabScrollStatus, EBizLevel } from '@shared/enums'
import { IBiz } from '@shared/interfaces/biz'

@Component({
  selector: 'app-group-detail-tab-systeminfos',
  templateUrl: './tab-systeminfos.component.html',
})
export class GroupDetailTabSysteminfosComponent implements OnInit {
  constructor(
    private commonGroupService: CommonGroupService,
    private pageService: PageService,
  ) {}

  bizLevel = EBizLevel.Group
  bizInfo: IBiz

  ngOnInit() {
    this.commonGroupService.viewGroup$.value$.subscribe(group => {
      this.bizInfo = group
    })
    this.pageService.setTabScrollStatus(ETabScrollStatus.Scroll)
  }
}
